#!/usr/bin/python

# Demonstrates use of sys.argv function. 
# Ths program matches searches the given text in given file and prints the line matches the text given. 
# This program accepts two inputs argv[1] which the file path (absolute path) and argv[2] 
# is the text that you want to search. 

# Expect more modification to the file
# like accepting relative path
# searching for all files in a directory
# accepting regex  

import sys
#import time

def main():
 for line in open(sys.argv[1],'rU'):
  if sys.argv[2] in line:
   print line,

if __name__ == '__main__':
 main()
